﻿Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginHandler);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndHandler);

function BeginHandler(sender, args) {
  $.blockUI({
    theme: 'jquery-ui-1.10.4.custom',
    // <h1>Aguarde um momento... <br /></h1>
    message: '<center><img src="/Imagens/Imagens/carregando.gif" /></ center>'
  });
}

function EndHandler(sender, args) {
  $.unblockUI();
}